<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%-- jsp的动态包含和静态包含,参照Servlet知识点 --%>
<%@ include file="/common/include/page.jsp"%>
<!doctype html>
<html class="no-js" lang="en">

<head>
    <title>购物车列表 - 商城</title>
    <%@ include file="/common/include/title.jsp" %>
</head>
<body>
    <%@ include file="/common/include/header.jsp" %>
    <div class="cart-area">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <form action="#" class="cart-form">
                        <!-- Cart Title Start -->
                        <div class="cart-title">
                            <h5 class="last-title mt-50 mb-20">购物车列表</h5>
                        </div>
                        <!-- Cart Title End -->
                        <!-- Cart Table Area Start -->
                        <div class="table-desc">
                            <div class="cart-page table-responsive">
                                <table>
                                    <thead>
                                    <tr>
                                        <th class="product-name">编号</th>
                                        <th class="product-image">图片</th>
                                        <th class="product-name">名称</th>
                                        <th class="product-price">价格</th>
                                        <th class="product-quantity">数量</th>
                                        <th class="product-total">总价格</th>
                                        <th class="product-remove">删除</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                        <c:forEach items="${requestScope.list}" var="listTemp" varStatus="stat">
                                            <tr>
                                                <td class="product-name">${stat.count}</td>
                                                <td class="product-image"><a href="#"><img src="${rootPath}/common/resources/assets//images/feature/feature-4.jpg" alt=""></a></td>
                                                <td class="product-name"><a href="#">${listTemp.goods.title}</a></td>
                                                <td class="product-price">${listTemp.goods.price}</td>
                                                <td class="product-quantity">${listTemp.num}</td>
                                                <td class="product-total">${listTemp.goods.price * listTemp.num}</td>
                                                <td class="product-remove"><a href="#"><i class="fa fa-trash-o"></i></a></td>
                                            </tr>
                                        </c:forEach>
                                    </tbody>
                                </table>
                            </div>
                            <div class="cart-submit">
                                <a href="${rootPath}/head/orders/ordersInsert.mvc">下单</a>
                            </div>
                        </div>
                        <!-- Cart Table Area End -->
                        <!-- Coupon Area Start -->
                        <div class="coupon-area">
                            <div class="row">
                                <div class="col-lg-6 col-md-6">
                                    <div class="coupon-code left">
                                        <h3>Coupon</h3>
                                        <div class="coupon-inner">
                                            <p>Enter your coupon code if you have one.</p>
                                            <input placeholder="Coupon code" type="text">
                                            <button type="submit">Apply coupon</button>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-6 col-md-6">
                                    <div class="coupon-code right">
                                        <h3>Cart Totals</h3>
                                        <div class="coupon-inner">
                                            <div class="cart-subtotal">
                                                <p>Subtotal</p>
                                                <p class="cart-amount">£215.00</p>
                                            </div>
                                            <div class="cart-subtotal ">
                                                <p>Shipping</p>
                                                <p class="cart-amount"><span>Flat Rate:</span> £255.00</p>
                                            </div>
                                            <a href="#">Calculate shipping</a>

                                            <div class="cart-subtotal">
                                                <p>Total</p>
                                                <p class="cart-amount">£215.00</p>
                                            </div>
                                            <div class="checkout-btn">
                                                <a href="#">Proceed to Checkout</a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- Coupon Area End -->
                    </form>
                </div>
            </div>
        </div>
    </div>
    <%@ include file="/common/include/footer.jsp"%>
</body>
</html>